//
//  XLLoginRegisterInteractor.m
//  industry
//
//  Created by xl on 2020/11/13.
//  Copyright © 2020 Haier. All rights reserved.
//

#import "XLLoginRegisterInteractor.h"
#import "XLLoginRegisterInteractorProtocol.h"
#import "XLLoginRegisterVC.h"
#import "AppStartUpConfig.h"

@interface XLLoginRegisterInteractor ()<XLLoginRegisterInteractorProtocol>

@end
@implementation XLLoginRegisterInteractor

- (void)dealloc {
    XLLog(@"XLLoginRegisterInteractor dealloc");
}

#pragma mark - XLLoginRegisterInteractorProtocol
- (void)gotoRegisterVC:(XLEntryLoginRegisterVCType)type {
    XLLoginRegisterVC *vc = [[XLLoginRegisterVC alloc] init];
    vc.entryType = type;
    [self.baseController.navigationController pushViewController:vc animated:YES];
}

//前往主页
- (void)gotoMainVC {
    [[AppStartUpConfig sharedAppStartUpConfig] jumpMainControllerWithVC:self.baseController];
}

//前往忘记密码第一步
- (void)gotoForgetPSNextVC:(BOOL)isStaff {
    XLLoginRegisterVC *vc = [[XLLoginRegisterVC alloc] init];
    vc.entryType = XLEntryLoginRegisterVCTypeForgetPassword;
    vc.isStaff = isStaff;
    [self.baseController.navigationController pushViewController:vc animated:YES];
}

//前往绑定第一步
- (void)gotoBindNextVC:(BOOL)isStaff {
    XLLoginRegisterVC *vc = [[XLLoginRegisterVC alloc] init];
    vc.entryType = XLEntryLoginRegisterVCTypeBind;
    vc.isStaff = isStaff;
    [self.baseController.navigationController pushViewController:vc animated:YES];
}

//前往忘记密码重置界面
- (void)gotoForgetPSFinishVC:(NSString *)phone
                     isStaff:(BOOL)isStaff {
    XLLoginRegisterVC *vc = [[XLLoginRegisterVC alloc] init];
    vc.entryType = XLEntryLoginRegisterVCTypeForgetPasswordFinish;
    vc.phone = phone;
    vc.isStaff = isStaff;
    [self.baseController.navigationController pushViewController:vc animated:YES];
}

//前往注册第一步
- (void)gotoRegistrNextVC:(BOOL)isStaff {
    XLLoginRegisterVC *vc = [[XLLoginRegisterVC alloc] init];
    vc.entryType = XLEntryLoginRegisterVCTypeRegister;
    vc.isStaff = isStaff;
    [self.baseController.navigationController pushViewController:vc animated:YES];
}

//前往注册完成
- (void)gotoRegisterFinishVC:(NSString *)phone
                     isStaff:(BOOL)isStaff {
    XLLoginRegisterVC *vc = [[XLLoginRegisterVC alloc] init];
    vc.entryType = XLEntryLoginRegisterVCTypeRegisterFinish;
    vc.phone = phone;
    vc.isStaff = isStaff;
    [self.baseController.navigationController pushViewController:vc animated:YES];
}


@end
